package vista.treeDiagrama;

import javax.swing.tree.DefaultMutableTreeNode;

public abstract class NodoTreeDiagrama {

	public abstract String getPathArchivoImagenCerrado();
	public abstract String getPathArchivoImagenAbierto();
	public abstract String getPathArchivoImagenHoja();
	
	protected PopupMenuEditar popupMenu;
	
	private DefaultMutableTreeNode mutTreeNode = null;
	private TreeDeDiagrama arbol = null;
	
	public NodoTreeDiagrama(PopupMenuEditar popupMenu)
	{
		super();
		
		this.popupMenu = popupMenu;
	}
	
	public void mostrarPopupMenu(TreeDeDiagrama invoker, int x, int y ) {
		this.popupMenu.show(invoker, x, y);
	}
	
	public PopupMenuEditar getPopupMenu() {
		return this.popupMenu;
	}
	
	public void eliminarse() {
		this.getArbol().quitarNodoTree(this.getMutTreeNode());
	}
	
	public DefaultMutableTreeNode getMutTreeNode() {
		return mutTreeNode;
	}
	
	void setMutTreeNode(DefaultMutableTreeNode mutTreeNode) {
		this.mutTreeNode = mutTreeNode;
	}
	
	public TreeDeDiagrama getArbol() {
		return arbol;
	}
	
	void setArbol(TreeDeDiagrama arbol) {
		this.arbol = arbol;
	}
}
